﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Entity;

public partial class Admin_Pages_OrderStatistic : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            OrderBillUI orderUI = new OrderBillUI();
            DataSet dsOrder = orderUI.Statistic();
            ArrayList arr = new ArrayList();
            
            int wait = Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Wait"].ToString());
            int paid = Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Paid"].ToString());
            int comp= Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Complete"].ToString());
            int reject = Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Reject"].ToString());
            arr.Add(new Statistic("Wait",wait));
            arr.Add(new Statistic("Paid", paid));
            arr.Add(new Statistic("Complete", comp));
            arr.Add(new Statistic("Reject", reject));

            RadChart1.DataSource = arr;
            RadChart1.DataBind();

        }
    }
}
